#ifndef PICTURE_H
#define PICTURE_H
#include <vector>
#include <string>

using namespace std;

/**
* This class will be the model for a Picture, the constructor will be private,
* then the only way to create new Pictures will be use the static member functions.
*
* Adapted by Alfredo Paz from Haskell (Heijltjes, Walder)
*/
class Picture{
private:
  vector<string> img;
  int width;
  int heigth;
  Picture(vector<string> img);
  char invColor(char c);
  char overlay(char c1, char c2);

public:
  /**
  * The Picture is only a string array
  * @return the Picture body
  */
  vector<string> getImg(){
    return img;
  }

  /**
  * The Picture's width, the max length for all strings
  * @return the Picture's width 
  */
  int getWidth(){
    return width;
  }

  /**
  * The Picture's heigth, the size of vector
  * @return the Picture's heigth
  */
  int getHeight(){
    return heigth;
  }

  /**
   * Vertical Mirror Image 
   * @return a new Picture, the vertical mirror.
   */
  Picture* voltearV();

  /**
  * Horizontal Mirror Image
  * @return a new Picture, the horizontal mirror.
  */
  Picture* voltearH();

  /**
  * Negative Color
  * @return a new Picture, the negative color.
  */
  Picture* invertir();

  /**
  * Put the image p next to the right of the current image.
  * @param p the neighbor image
  * @return a new image
  */
  Picture* alLado(Picture* p);

  /**
  * Put the image p next to down of the current image.
  * @param p the neighbor image
  * @return a new image
  */
  Picture* encima(Picture* p);

  /**
  * Merge the current picture over the picture p. 
  * @param p the picture that will be on the behind.
  * @return a new picture
  */
  Picture* superponer(Picture* p);

  /**
  * Repeat horizontally the current picture n times (to right).
  * @param n a positive integer greater than 0.
  * @return a new picture.
  */
  Picture* repetirH(int n);

  /**
  * Repeat vertically the current picture n times (to down).
  * @param n a positive integer greater than 0.
  * @return a new picture.
  */
  Picture* repetirV(int n);

  /**
  * One basic Picture
  * @return a white square
  */
  static Picture* casilleroBlanco();

  /**
  * One basic Picture
  * @return a white bishop
  */
  static Picture* alfil();
  
  /**
  * One basic Picture
  * @return a white king
  */
  static Picture* rey();
  
  /**
  * One basic Picture
  * @return a white knight
  */
  static Picture* caballo();
  
  /**
  * One basic Picture
  * @return a white pawn
  */
  static Picture* peon();
  
  /**
  * One basic Picture
  * @return a white queen
  */
  static Picture* dama();

  /**
  * One basic Picture
  * @return a white rook
  */
  static Picture* torre();
};
#endif
